package skewreduce.dfof;

import org.apache.hadoop.io.LongWritable;

import org.apache.hadoop.mapreduce.InputFormat;
import org.apache.hadoop.mapreduce.OutputFormat;

import skewreduce.framework.WritableInputFormat;
import skewreduce.framework.WritableOutputFormat;
import skewreduce.framework.physical.RandomSample;
import skewreduce.lib.Point3D;




public class dFoFSample extends RandomSample {
    
    public static class Point3DInputFormat
    extends WritableInputFormat<LongWritable,Point3D> {
        private LongWritable key = new LongWritable();

        public LongWritable createKey() { return key; }
        public Point3D createValue() { return new Point3D(); }
        public int getKeySize() { return 8; }
        public int getValueSize() { return 12; }
    }

    public static class Point3DOutputFormat 
    extends WritableOutputFormat<LongWritable,Point3D> {}
	
//	public static class dFoFSampleMapper extends SpatialSampleMapper<LongWritable,Point3D> {}
//	public static class dFoFSampleReducer extends SpatialSampleReducer<LongWritable,Point3D> {}

	
    @Override
	protected Class<? extends InputFormat<?, ?>> getInputFormatClass() {
		return Point3DInputFormat.class;
	}

//	@Override
//	protected Class<? extends SampleMapper<?, ?>> getMapperClass() {
//		return dFoFSampleMapper.class;
//	}

	@Override
	protected Class<? extends OutputFormat<?, ?>> getOutputFormatClass() {
		return Point3DOutputFormat.class;
	}

	@Override
	protected Class<?> getOutputKeyClass() {
		return LongWritable.class;
	}

	@Override
	protected Class<?> getOutputValueClass() {
		return Point3D.class;
	}

//	@Override
//	protected int getRecordSize() {
//		return 20;
//	}

//	@Override
//	protected Class<? extends SpatialSampleReducer<?, ?>> getReducerClass() {
//		return dFoFSampleReducer.class;
//	}
}
